Global Index
HTML5 JS API Index > Pointer Lock Tutorials & Specs

Document

This page describes Pointer Lock extensions to the origial Document type.

Properties
EventHandler?
onpointerlockchange
An event handler for pointerlockchange events.
EventHandler?
onpointerlockerror
An event handler for pointerlockerror events.
Element (Pointer Lock)?
pointerLockElement
Returns the element set as the target for mouse events while the pointer is locked. Null if lock is pending, pointer is unlocked, or if the target is in another document.
Operations
void
exitPointerLock()
Initiates an exit from pointer lock state if currently locked to a target in this document, and sends a pointerlockchange event when the lock state has been exited. The system mouse cursor must be displayed again and positioned at the same location that it was when pointer lock was entered (the same location that is reported in screenX/Y when the pointer is locked).